package com.huawei.appgallery.foundation.ui.framework.uikit;

import android.app.Activity;
import android.os.Bundle;
import androidx.fragment.app.FragmentActivity;
import o.cjj;
import o.cjo;
import o.ckx;

public abstract class ContractActivity<T extends cjo> extends FragmentActivity {
    private cjj ॱˊ = cjj.ˊ((Activity) this);

    protected T ʾ() {
        try {
            return (cjo) this.ॱˊ.ˏ();
        } catch (RuntimeException e) {
            ckx.ˎ.ˊ("ContractActivity", "getProtocol appends RuntimeException!");
            return null;
        }
    }

    public void onSaveInstanceState(Bundle bundle) {
        bundle.setClassLoader(getClassLoader());
        this.ॱˊ.ˋ(bundle);
        super.onSaveInstanceState(bundle);
    }

    protected void onRestoreInstanceState(Bundle bundle) {
        this.ॱˊ.ˊ(bundle);
        super.onRestoreInstanceState(bundle);
    }

    public void onDestroy() {
        super.onDestroy();
        this.ॱˊ.ˊ();
    }
}
